using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinformDevelopFrame.IRepository;
using WinformDevelopFrame.Entity;

namespace WinformDevelopFrame.Repository
{
    public class sysconnectRepository : BaseRepository<sysconnect>, IsysconnectRepository
    {
        private ISqlSugarClient _sqlSugarClient;
        public sysconnectRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
        {
            _sqlSugarClient= sqlSugar;
        }

        public int Add(sysconnect m)
        {
            return Insert(m);
        }

        public int AddList(List<sysconnect> list)
        {
            return Insert(list);
        }

        public bool UpdateN(sysconnect m)
        {
            return Update(m);
        }

        public bool UpdateList(List<sysconnect> list)
        {
            return Update(list);
        }

        public bool DeleteN(sysconnect m)
        {
            return Delete(m);
        }

        public bool DeleteList(List<sysconnect> list)
        {
            return Delete(list);
        }

        public sysconnect QueryById(int id)
        {
            return QueryByIdAsync(id).Result;
        }

        public List<sysconnect> QueryList(List<int> ids)
        {
            return QueryByIDs(ids.ToArray());
        }
    }
}